﻿using RuoVea.ExEnum;
using RuoVea.ExUtil;
using System.Collections;

namespace BookMarks.Server.Dto;
public class CategoryDto : ITreeNode
{
    /// <summary>
    /// 
    /// </summary>  
    public long Id { get; set; }
    /// <summary>
    /// 
    /// </summary>  
    public long ParentId { get; set; }
    /// <summary>
    /// 子节点
    /// </summary>
    public List<CategoryDto> Children { get; set; } = new List<CategoryDto>();

    /// <summary>
    /// Code
    /// </summary>
    public string Code { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 状态-正常_0、停用_1 
    /// </summary>
    public YesOrNot? IsDisable { get; set; }
    /// <summary>
    /// 排序越大越靠后
    /// </summary>
    public int Sort { get; set; }
    /// <summary>
    /// 可推送线上
    /// </summary>
    public int PutLine { get; set; }
    /// <summary>
    /// 内容
    /// </summary>
    public string Remark { get; set; }

    public long GetId()
    {
        return Id;
    }

    public long GetPid()
    {
        return ParentId;
    }

    public void SetChildren(IList children)
    {
        Children = (List<CategoryDto>)children;
    }
}
